<!doctype html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="{{asset('/css/mdui.min.css')}}">
    <style>
        body{
            background: #f5f5f5 url("{{asset('/images/auth_bg.gif')}}");
        }
        .login-container{
            margin-top: 140px;
        }
        .warp{
            background-color: #fff;
        }
    </style>
    <title>后台登录</title>
</head>
<body class="mdui-theme-primary-blue mdui-theme-accent-blue">
<div class="mdui-container login-container">
    <div class="mdui-row mdui-valign">
        <form class="warp mdui-col-md-3 mdui-center mdui-shadow-2 mdui-p-a-3" method="post">
            {{csrf_field()}}
            <div class="mdui-textfield mdui-textfield-floating-label">
                <label class="mdui-textfield-label">用户名</label>
                <input class="mdui-textfield-input" type="text" name="username" value="{{old('username')}}"/>
                @if(count($errors) > 0)
                    <div class="alert alert-danger">{{$errors->first('username')}}</div>
                @endif
                {{session('loginFails')}}
            </div>
            <div class="mdui-textfield mdui-textfield-floating-label ">
                <label class="mdui-textfield-label">密码</label>
                <input class="mdui-textfield-input" type="password" name="password" value="{{old('password')}}"/>
                @if(count($errors) > 0)
                    <div class="alert alert-danger">{{$errors->first('password')}}</div>
                @endif
            </div>
            <div class="mdui-textfield mdui-textfield-floating-label ">
                <div class="mdui-row">
                    <div class="mdui-col-md-6">
                        <label class="mdui-textfield-label">验证码</label>
                        <input class="mdui-textfield-input" type="text" name="captcha" value=""/>
                        @if(count($errors) > 0)
                            <div class="alert alert-danger">{{$errors->first('captcha')}}</div>
                        @endif
                    </div>
                    <div class="mdui-col-md-6">
                        <img class="mdui-img-rounded" src="{{captcha_src()}}" style="cursor: pointer;" onclick="this.src='{{captcha_src()}}?'+(new Date()).getTime()" alt="验证码">
                    </div>
                </div>
            </div>
            <input class="mdui-btn mdui-btn-block mdui-color-theme mdui-ripple mdui-m-t-2" type="submit" value="登录">
        </form>
    </div>
</div>

<script src="{{asset('/js/jquery-1.8.3.min.js')}}"></script>
<script src="{{asset('/js/mdui.min.js')}}"></script>
</body>
</html>